//
//  UserDataConfig.swift
//  WeiBoAPP
//
//  Created by ios001 on 2022/3/10.
//  Copyright © 2022 zxf. All rights reserved.
//

import UIKit

class UserDataConfig: NSObject {
    
    var isLogin:Bool?//单利的属性
    var userName:String?//单利的属性
    var pwd:String?//单利的属性

    static let shared = UserDataConfig()
    private override init() {}
    override func copy() -> Any {
        return self
    }
    override func mutableCopy() -> Any {
        return self
    }
    
    // Optional
    func reset() {
    }
    
    
    // 用户数据
    func saveUserInfo(info:Any?) {
        let infoDic = info as? [String: Any]
        
        userName = infoDic?["userName"] as? String
        pwd = infoDic?["pwd"] as? String
    }
    // 用户数据
    func clearUserInfo() {
        userName = ""
        pwd = ""
        
        
    }
}
